export default {
    data() {
        return {
            contactsList: [{
                    "name": "新的朋友",
                    "img": "img/新的朋友.png"
                },
                {
                    "name": "群聊",
                    "img": "img/群聊.png"
                },
                {
                    "name": "标签",
                    "img": "img/标签.png"
                },
                {
                    "name": "公众号",
                    "img": "img/公众号.png"
                }
            ],
            companyContact: {
                "name": "企业微信联系人",
                "img": "img/企业微信联系人.jpeg"
            },
            friendList: [
                {
                    "name": "王镇潇",
                    "img": "img/duanmofeng.jpg",
                    "wx": "老王",
                    "area": "江苏 苏州"
            
                },
                {
                    "name": "熊志忍",
                    "img": "img/liuwei.jpg",
                    "wx": "Xxiong",
                    "area": "江苏 淮安"
            
                },
                {
                    "name": "钱雁月",
                    "img": "img/yanzhicheng.jpg",
                    "wx": "qianyanyue",
                    "area": "江苏 常熟"
                },
            ]
        }
    },
    template: `
    <div>
        <div v-for="item in contactsList" class="contacts">
            <div class="contacts-left">
                <img :src="item.img" alt="">
            </div>
            <div class="contacts-right">
                <p>{{item.name}}</p>
            </div>
        </div>
        <p class="p">我的企业及企业联系人</p>
        <div class="contacts-company">
           <div class="contacts-left">
            <img :src="companyContact.img" alt="">
            </div>
            <div class="contacts-right">
                {{companyContact.name}}
            </div>
       </div>
        <p class="p">好友</p>
        <div class="contacts-company" v-for="item in friendList"  @click="toDetail(item)">
           <div class="contacts-left">
            <img :src="item.img" alt="">
            </div>
            <div class="contacts-right">
                {{item.name}}
            </div>
       </div>
    </div>
    `,
    methods: {
        toDetail(item) {
            this.$router.push({
                path: "/friend",
                query: item,
            })
        }
    },
}